---
title: Configuration.decompressHTTP()
api: Configuration.decompressHTTP
---

## Description

<Summary/>

<FilterDiagram
  name="decompressHTTP"
  input="Message"
  output="Message"
/>

This filter checks _head.headers['content-encoding']_ in the input [MessageStart](/reference/api/MessageStart) event. If its value is either of _"gzip"_ or _"br"_, the message body will be decompressed in the output.

You can also dynamically enable or disable the compression by giving a function to the _enable_ parameter. Decompression will only happen when the function returns truthy.

## Syntax

``` js
pipy()
  .pipeline()
  .decompressHTTP()

pipy()
  .pipeline()
  .decompressHTTP(
    () => isEnabled()
  )
```

## Parameters

<Parameters/>

## See Also

* [Configuration](/reference/api/Configuration)
* [decompressMessage()](/reference/api/Configuration/decompressMessage)
